﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.Caching;

namespace OurWeb.Dependency
{
    public sealed class CacheAccess
    {
        public static object GetFromCache(string cacheKey)
        {
            Cache cache = HttpRuntime.Cache;

            return cache[cacheKey];
        }

        public static void SaveToCache(string cacheKey, object cacheObject, CacheDependency dependency)
        {
            Cache cache = HttpRuntime.Cache;
            cache.Insert(cacheKey, cacheObject, dependency);
        }
    }
}
